Skip to content

fix: autocomplete trigger detection for inline file mentions#107

Merged
Dimillian merged 2 commits intomainfrom
codex/github-mention-file-search-results-with-@-doesn-t-work-pr
Jan 19, 2026
Merged

fix: autocomplete trigger detection for inline file mentions#107
Dimillian merged 2 commits intomainfrom
codex/github-mention-file-search-results-with-@-doesn-t-work-pr

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Inline file mentions using @ (e.g. referencing files after punctuation) were not being detected by the composer autocomplete, causing zero results for queries like @Sentence.

Description

  • Replace the previous token-start logic with a backward scan in resolveAutocompleteState to locate trigger characters and compute the query range.
  • Add triggerPrefixRegex and only accept triggers when the preceding character is absent or matches allowed prefixes (whitespace or punctuation).
  • Build a triggerSet from available triggers and compute query and range from the detected trigger position.
  • File modified: src/features/composer/hooks/useComposerAutocomplete.ts.

Testing

  • Ran npm run lint and the linter completed successfully.
  • Ran npm run typecheck (tsc --noEmit) and the type check completed successfully.

Codex Task

@Dimillian Dimillian changed the title Fix autocomplete trigger detection for inline file mentions fix: autocomplete trigger detection for inline file mentions Jan 19, 2026
@Dimillian
Copy link
Owner Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian Dimillian merged commit 701fb3c into main Jan 19, 2026
2 checks passed
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant